<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Buildings extends Model
{
    protected $fillable = [
        'name',
        'info',
        'username',
        'phone' ,
        'attach_id',
        'prize',
        'area_id',
        'type_id',
        'logo',
        'long',
        'lat',
        'vote_count',
        'location',
    ];
    public function attach(){
        return $this->hasOne('App\Models\Attachs','id','attach_id');
    }

    public function areas(){
        return $this->hasOne('App\Models\Areas','id','area_id');
    }
}
